#include <QTableWidget>
#include <QTreeWidget>
#include <QHeaderView>
#include <QApplication>

int main (int argc, char *argv[])
{
  QApplication khello(argc,argv);
 
  QTreeWidget* mw=new QTreeWidget(0);
 
  QStringList labels;
  mw->setColumnCount(2);
  mw->setEditTriggers(QAbstractItemView::AllEditTriggers);
  QTreeWidgetItem* item=new QTreeWidgetItem(0);
  item->setText(0,"zone");
  item->setText(1,"hi");
  item->setFlags(Qt::ItemIsEnabled);
  mw->insertTopLevelItem(0,item);

  
  QTreeWidgetItem* child=new QTreeWidgetItem(0);
  child->setText(0,"policy");
  child->setText(1,"name");
  child->setFlags(Qt::ItemIsEnabled);
 
  item->addChild(child);
  
  //that one adds a second one
  QTreeWidgetItem* item2=new QTreeWidgetItem(0);
  item2->setText(0,"zone");
  item2->setText(1,"hi");
  
  mw->insertTopLevelItem(1,item2);
  mw->show();
  khello.exec();
}
